const process = require('process');

console.log(__dirname);
console.log(__filename);

var filePath = "";

var platForm = process.platform;

switch(platForm){
    case "win32":
        filePath = __dirname + "\\view\\demo.html";
        break;
    case "linux":
        filePath = __dirname + "/view/demo.html";
        break;
    default:
        console.log("操作系统未知");
        break;
}
console.log(filePath);

const path = require('path');
var pathStr = path.join(__dirname,"/view/demo.html");
console.log(pathStr);